From: Jan Beulich Date: Tue, 9 Feb 2016 12:21:38 +0000 (+0100) Subject: x86emul: drop redundant #GP checks X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1795 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e2d1fe89da0ced77546e84e1563c906380a9274f;p=xen.git x86emul: drop redundant #GP checks in_protmode() implies !in_realmode(), so we don't need to check both. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index c3672e7de6..90f8632379 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -3972,7 +3972,6 @@ x86_emulate( uint64_t msr_content; struct segment_register cs, ss; - generate_exception_if(in_realmode(ctxt, ops), EXC_UD, -1); generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, -1); /* Inject #UD if syscall/sysret are disabled. */ @@ -4218,7 +4217,6 @@ x86_emulate( int lm; generate_exception_if(mode_ring0(), EXC_GP, 0); - generate_exception_if(in_realmode(ctxt, ops), EXC_GP, 0); generate_exception_if(!in_protmode(ctxt, ops), EXC_GP, 0); fail_if(ops->read_msr == NULL); @@ -4267,7 +4265,6 @@ x86_emulate( bool_t user64 = !!(rex_prefix & REX_W); generate_exception_if(!mode_ring0(), EXC_GP, 0); - generate_exception_if(in_realmode(ctxt, ops), EXC_GP, 0); generate_exception_if(!in_protmode(ctxt, ops), EXC_GP, 0); fail_if(ops->read_msr == NULL);